package com.kaibes.imserver.model.data;

import java.sql.ResultSet;
import java.sql.SQLException;

public class UserCenterInformationData {

	private ResultSet resultSet;
	private String username = null;
	private String password;
	private String question;
	private String answer;

	public UserCenterInformationData(ResultSet resultSet) {
		this.resultSet = resultSet;
		init();
	}

	private void init() {
		try {
			if (resultSet != null) {
				while (resultSet.next()) {
					username = resultSet.getString("username");
					password = resultSet.getString("password");
					question = resultSet.getString("question");
					answer = resultSet.getString("answer");
				}
				resultSet.close();
			}
		} catch (SQLException e) {
			e.printStackTrace();
		}
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getQuestion() {
		return question;
	}

	public void setQuestion(String question) {
		this.question = question;
	}

	public String getAnswer() {
		return answer;
	}

	public void setAnswer(String answer) {
		this.answer = answer;
	}

}
